#@layout()
#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            角色设置
            <small>Role Setting</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header ">
                        <h3 class="box-title"></h3>
                    </div>
                    <form class="form-horizontal form-setting" autocomplete="off"
                          action="#(CPATH)/admin/user/doRoleSave"
                          method="POST"
                    >
                        <input type="hidden" name="role.id" value="#(role.id ??)">
                        <div class="box-body ">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">名称</label>

                                <div class="col-sm-6">
                                    <input type="input" name="role.name" class="form-control" value="#(role.name ??)"
                                           placeholder="建议设置一个直观的、不需要解释的名称">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">超级管理员</label>
                                <div class="col-sm-6">
                                    #if(role)
                                    <input type="checkbox" class="switchery" name="issuper" value="true"
                                           #checkedIf(role.isSuperAdmin())>
                                    #else
                                    <input type="checkbox" class="switchery" name="issuper" value="true">
                                    #end
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">描述</label>
                                <div class="col-sm-6">
                                    <textarea rows="5" name="role.description" class="form-control"
                                              placeholder="该角色的一些描述 或 备注">#(role.description ??)</textarea>
                                </div>
                            </div>

                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <div class="col-sm-offset-2 col-sm-10 submit-block">
                                <div class="box-submit">
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>
            </div>
        </div>

    </section>

</div>
#end
